<?php

function validateName($name) {
    //if it's not valid
    if(strlen($name) < 4)
        return false;
    //if it's valid
    else
        return true;
}

function validateBornday($bornday){
    //if it's not valid
    if($bornday < 32 && $bornday > 0 && strlen($bornday) != 2)
        return false;
    //if it's valid
    else
        return true;
}

function validateBornMonth($bornmonth){
    //if it's NOT valid
    if($bornmonth < 13 && $bornmonth > 0 && strlen($bornmonth) != 2)
        return false;
    //If it's valid
    else
        return true;
}

function validateBornyear($bornyear){
    //if it's NOT valid
    if(strlen($bornyear) != 4)
        return false;
    //if it's valid
    else
        return true;
}

function validateSex($sex){
    //if it's NOT valid
    if($sex==null)
        return false;
    //if it's valid
    else
        return true;
}

function validateMaritalstatus($maritalstatus){
    //if it's NOT valid
    if($maritalstatus==null)
        return false;
    //if it's valid
    else
        return true;
}

function validateMedicallyfit($medicallyfit){
    //if it's NOT valid
    if($medicallyfit==null)
        return false;
    //if it's valid
    else
        return true;
}

function validateAddr1($addr){
    //if it's NOT valid
    if(strlen($termaddr) < 10)
        return false;
    //if it's valid
    else
        return true;
}

function validatePostalcode($postalcode){
    //if it's NOT valid
    if(strlen($postalcode) != 4)
        return false;
    //if it's valid
    else
        return true;
}

function validatePhone($phone){
    //if it's NOT valid
    if(strlen($phone) != 8)
        return false;
    //if it's valid
    else
        return true;
}

function validateNationality($nationality){
    //if it's NOT valid
    if(strlen($nationality) < 4)
        return false;
    //if it's valid
    else
        return true;
}
?>
